﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Composite.Regions;
using Infrastructure.Silverlight.Constants;
using System.ServiceModel.DomainServices.Client;
using Skynet.BusinessEntities;
using Skynet.ServiceImplementation;
namespace Skynet.SLFoundation
{
    public class ModuleIni : IModule
    {
        private readonly IUnityContainer container;
        private readonly IRegionManager regionManager;

        public ModuleIni(IUnityContainer container, IRegionManager regionManager)
        {
            this.container = container;
            this.regionManager = regionManager;
        }
        public void Initialize()
        {
            RegisterServices();
            RegisterViews();            
            
        }
        public void RegisterServices()
        {
            this.container.RegisterType<Infrastructure.Silverlight.Services.Navigation.INavigationService, Infrastructure.Silverlight.Services.Navigation.NavigationService>();                        
            Skynet.ServiceImplementation.SkynetDomainContext context = new ServiceImplementation.SkynetDomainContext(new Uri("http://localhost:10001/SkynetDomainService.svc"));
            this.container.RegisterInstance<SkynetDomainContext>(context);
        }
        public void RegisterViews()
        {
            

        }
        
    }
}
